package controller;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import main.Log;

import view.MainMenuOverlay;
import view.View;

public class MainMenuController extends Controller {

	private MainMenuOverlay mmo;
	
	public MainMenuController(MainMenuOverlay mmo) {
		this.mmo = mmo;
		this.initiate();
	}
	
	private void initiate() {
		this.mmo.setSmasherListener(new MouseListener() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				Log.out(Log.CONTROLLER, "start game as smasher here.");
				makeOverlayInvisible();
			}
			@Override
			public void mouseEntered(MouseEvent arg0) {}
			@Override
			public void mouseExited(MouseEvent arg0) {}
			@Override
			public void mousePressed(MouseEvent arg0) {}
			@Override
			public void mouseReleased(MouseEvent arg0) {}
		});
		this.mmo.setSneakListener(new MouseListener() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				Log.out(Log.CONTROLLER, "start game as sneak here.");
				makeOverlayInvisible();
			}
			@Override
			public void mouseEntered(MouseEvent arg0) {}
			@Override
			public void mouseExited(MouseEvent arg0) {}
			@Override
			public void mousePressed(MouseEvent arg0) {}
			@Override
			public void mouseReleased(MouseEvent arg0) {}
		});
		this.mmo.setSummonerListener(new MouseListener() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				Log.out(Log.CONTROLLER, "start game as summoner here.");
				makeOverlayInvisible();
			}
			@Override
			public void mouseEntered(MouseEvent arg0) {}
			@Override
			public void mouseExited(MouseEvent arg0) {}
			@Override
			public void mousePressed(MouseEvent arg0) {}
			@Override
			public void mouseReleased(MouseEvent arg0) {}
		});
	}
	
	private void makeOverlayInvisible() {
		this.mmo.makeInvisible();
	}
	
	@Override
	public void update(View v) {}

	
}
